﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ModelPredictPro.WindowForms {
  public class EnumBinder<T> {

    private List<EnumWrapper<T>> pairs;
    public EnumBinder() {
      pairs = new List<EnumWrapper<T>>();
      foreach (var item in Enum.GetNames(typeof(T))) {
        pairs.Add(new EnumWrapper<T> { Name = item, Enum = (T)Enum.Parse(typeof(T), item) });
      }
    }
    public List<EnumWrapper<T>> Pairs {
      get { return pairs; }
    }
  }
  public class EnumWrapper<T> {
    public string Name { get; set; }
    public T Enum { get; set; }
  }
}
